package io.coderyeah.ymcc.web.controller;

import io.coderyeah.ymcc.anno.Phone;
import io.coderyeah.ymcc.result.JSONResult;
import io.coderyeah.ymcc.service.VerifyCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.Pattern;

/**
 * @author lqs
 * @date 2022/10/20 10:32
 */
@RestController
@RequestMapping("/verifycode")
public class verifycodeController {
    @Autowired
    private VerifyCodeService codeService;

    @GetMapping("/sendSmsCode/{phone}")
    public JSONResult sendSmsCode(@PathVariable String phone) {
        return codeService.sendSmsCode(phone);
    }
}
